Home | Trees | Index | Help |
---|
Package i2p :: Module samclasses :: Class StreamSession |
|
BaseSession
--+
|
StreamSession
Method Summary | |
---|---|
__init__(self,
name,
addr,
**kwargs)
| |
Unconnected session; has no read data available. | |
Got STREAM CLOSED command. | |
Got STREAM CONNECTED command. | |
Got STREAM RECEIVED command. | |
Internal command, got STREAM STATUS. | |
Internal command, send data to stream id. | |
Wait for incoming connection, and return a Stream object for it. | |
Create a stream connected to remote destination 'dest'. | |
Set maximum number of queued connections. | |
Inherited from BaseSession | |
Internal command, encode extra kwargs for passing to SESSION CREATE. | |
Internal command, handshake with SAM terminal. | |
Internal command, does a NAMING LOOKUP query. | |
Internal command, got HELLO REPLY. | |
Internal command, got NAMING REPLY. | |
Internal command, got SESSION STATUS. | |
Internal command, call at end of __init__ to set up properties. | |
Close the session. |
Method Details |
---|
__len__(self)
Unconnected session; has no read data available.
|
_on_STREAM_CLOSED(self, **kwargs)Got STREAM CLOSED command. Call idmap[id].on_close(e) and delete idmap[id]. |
_on_STREAM_CONNECTED(self, **kwargs)Got STREAM CONNECTED command. This is what accept() commands wait for. |
_on_STREAM_RECEIVED(self, **kwargs)Got STREAM RECEIVED command. Dispatch to idmap[id].on_receive(s). |
_on_STREAM_STATUS(self, **kwargs)Internal command, got STREAM STATUS. Unblocks connect. |
_send_stream(self, id, data)Internal command, send data to stream id. Use Stream.send in your code. |
accept(self, timeout=None)Wait for incoming connection, and return a Stream object for it. |
connect(self, dest, timeout=None)Create a stream connected to remote destination 'dest'. The id is random. If the timeout is exceeded, do NOT raise an error; rather, return a Stream object with .didconnect set to False. |
listen(self, backlog)Set maximum number of queued connections. |
Home | Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Mon Aug 02 01:07:41 2004 | http://epydoc.sf.net |